import { mainStore } from "source/store/main";

// 赋予在小恐龙上的外部脚本
export default class HitTest extends Laya.Script {
    onTriggerEnter: LayaPlus.onTrigger = function (other, self) {
        if (
            other.owner.name === "wall" &&
            (other.owner as Laya.Sprite).y >= (self.owner as Laya.Sprite).y
        ) {
            const player = mainStore.get("Player")!;
            player.jumping = false;
            // console.log("可以再次跳跃");
        }
        // console.log(other);
    };
}
